package cn.scu.ne04jdemo.dao;


import cn.scu.ne04jdemo.entitiy.Enterprise;
import cn.scu.ne04jdemo.entitiy.LinkInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EDao {

    @Select("select * from sys_e")
    List<Enterprise>  getAllEnterprise();

    @Select("select * from sys_e t where t.name=#{eName}")
    Enterprise getEnterpriseByName(String eName);

    void updateEnterpriseByName(Enterprise enterprise);

    int insertE(Enterprise enterprise);

    @Select("select * from sys_l")
    List<LinkInfo> getAllL();

    @Delete("delete from sys_e where id = #{id}")
    void deleteEById(Integer id);
}
